home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / sgemv.z / sgemv
Encoding:
Text File  |  2002-10-03  |  20.7 KB  |  397 lines

  1.  
  2.  
  3.  
  4. SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))                                                            SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SSSSGGGGEEEEMMMMVVVV, DDDDGGGGEEEEMMMMVVVV, CCCCGGGGEEEEMMMMVVVV, ZZZZGGGGEEEEMMMMVVVV - Multiplies a real or complex vector by a
  10.      real or complex general matrix
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      Single precision
  14.  
  15.           Fortran:
  16.                CCCCAAAALLLLLLLL SSSSGGGGEEEEMMMMVVVV ((((_t_r_a_n_s,,,, _m,,,, _n,,,, _a_l_p_h_a,,,, _a,,,, _l_d_a,,,, _x,,,, _i_n_c_x,,,, _b_e_t_a,,,, _y,,,, _i_n_c_y))))
  17.  
  18.           C/C++:
  19.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  20.                vvvvooooiiiidddd ssssggggeeeemmmmvvvv ((((cccchhhhaaaarrrr *_t_r_a_n_s,,,, iiiinnnntttt _m,,,, iiiinnnntttt _n,,,, ffffllllooooaaaatttt _a_l_p_h_a,,,, ffffllllooooaaaatttt *_a,,,,
  21.                iiiinnnntttt _l_d_a,,,, ffffllllooooaaaatttt *_x,,,, iiiinnnntttt _i_n_c_x,,,, ffffllllooooaaaatttt _b_e_t_a,,,, ffffllllooooaaaatttt *_y,,,, iiiinnnntttt _i_n_c_y))));;;;
  22.  
  23.      Double precision
  24.  
  25.           Fortran:
  26.                CCCCAAAALLLLLLLL DDDDGGGGEEEEMMMMVVVV ((((_t_r_a_n_s,,,, _m,,,, _n,,,, _a_l_p_h_a,,,, _a,,,, _l_d_a,,,, _x,,,, _i_n_c_x,,,, _b_e_t_a,,,, _y,,,, _i_n_c_y))))
  27.  
  28.           C/C++:
  29.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  30.                vvvvooooiiiidddd ddddggggeeeemmmmvvvv ((((cccchhhhaaaarrrr *_t_r_a_n_s,,,, iiiinnnntttt _m,,,, iiiinnnntttt _n,,,, ddddoooouuuubbbblllleeee _a_l_p_h_a,,,, ddddoooouuuubbbblllleeee *_a,,,,
  31.                iiiinnnntttt _l_d_a,,,, ddddoooouuuubbbblllleeee *_x,,,, iiiinnnntttt _i_n_c_x,,,, ddddoooouuuubbbblllleeee _b_e_t_a,,,, ddddoooouuuubbbblllleeee *_y,,,, iiiinnnntttt
  32.                _i_n_c_y))));;;;
  33.  
  34.      Single precision complex
  35.  
  36.           Fortran:
  37.                CCCCAAAALLLLLLLL CCCCGGGGEEEEMMMMVVVV ((((_t_r_a_n_s,,,, _m,,,, _n,,,, _a_l_p_h_a,,,, _a,,,, _l_d_a,,,, _x,,,, _i_n_c_x,,,, _b_e_t_a,,,, _y,,,, _i_n_c_y))))
  38.  
  39.           C/C++:
  40.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  41.                vvvvooooiiiidddd ccccggggeeeemmmmvvvv ((((cccchhhhaaaarrrr *_t_r_a_n_s,,,, iiiinnnntttt _m,,,, iiiinnnntttt _n,,,, ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_a_l_p_h_a,,,,
  42.                ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_a,,,, iiiinnnntttt _l_d_a,,,, ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_x,,,, iiiinnnntttt _i_n_c_x,,,,
  43.                ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_b_e_t_a,,,, ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_y,,,, iiiinnnntttt _i_n_c_y))));;;;
  44.  
  45.           C++ STL:
  46.                ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
  47.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  48.                vvvvooooiiiidddd ccccggggeeeemmmmvvvv ((((cccchhhhaaaarrrr *_t_r_a_n_s,,,, iiiinnnntttt _m,,,, iiiinnnntttt _n,,,, ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_a_l_p_h_a,,,,
  49.                ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_a,,,, iiiinnnntttt _l_d_a,,,, ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_x,,,, iiiinnnntttt _i_n_c_x,,,,
  50.                ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_b_e_t_a,,,, ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_y,,,, iiiinnnntttt _i_n_c_y))));;;;
  51.  
  52.      Double precision complex
  53.  
  54.           Fortran:
  55.                CCCCAAAALLLLLLLL ZZZZGGGGEEEEMMMMVVVV ((((_t_r_a_n_s,,,, _m,,,, _n,,,, _a_l_p_h_a,,,, _a,,,, _l_d_a,,,, _x,,,, _i_n_c_x,,,, _b_e_t_a,,,, _y,,,, _i_n_c_y))))
  56.  
  57.           C/C++:
  58.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  59.                vvvvooooiiiidddd zzzzggggeeeemmmmvvvv ((((cccchhhhaaaarrrr *_t_r_a_n_s,,,, iiiinnnntttt _m,,,, iiiinnnntttt _n,,,, ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_a_l_p_h_a,,,,
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))                                                            SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))
  71.  
  72.  
  73.  
  74.                ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_a,,,, iiiinnnntttt _l_d_a,,,, ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_x,,,, iiiinnnntttt _i_n_c_x,,,,
  75.                ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_b_e_t_a,,,, ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_y,,,, iiiinnnntttt _i_n_c_y))));;;;
  76.  
  77.           C++ STL:
  78.                ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
  79.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  80.                vvvvooooiiiidddd zzzzggggeeeemmmmvvvv ((((cccchhhhaaaarrrr *_t_r_a_n_s,,,, iiiinnnntttt _m,,,, iiiinnnntttt _n,,,, ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_a_l_p_h_a,,,,
  81.                ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_a,,,, iiiinnnntttt _l_d_a,,,, ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_x,,,, iiiinnnntttt _i_n_c_x,,,,
  82.                ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_b_e_t_a,,,, ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_y,,,, iiiinnnntttt _i_n_c_y))));;;;
  83.  
  84. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  85.      These routines are part of the SCSL Scientific Library and can be loaded
  86.      using either the ----llllssssccccssss or the ----llllssssccccssss____mmmmpppp option.  The ----llllssssccccssss____mmmmpppp option
  87.      directs the linker to use the multi-processor version of the library.
  88.  
  89.      When linking to SCSL with ----llllssssccccssss or ----llllssssccccssss____mmmmpppp, the default integer size is
  90.      4 bytes (32 bits). Another version of SCSL is available in which integers
  91.      are 8 bytes (64 bits).  This version allows the user access to larger
  92.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  93.      by using the ----llllssssccccssss____iiii8888 option or the ----llllssssccccssss____iiii8888____mmmmpppp option. A program may use
  94.      only one of the two versions; 4-byte integer and 8-byte integer library
  95.      calls cannot be mixed.
  96.  
  97.      The C and C++ prototypes shown above are appropriate for the 4-byte
  98.      integer version of SCSL. When using the 8-byte integer version, the
  99.      variables of type iiiinnnntttt become lllloooonnnngggg lllloooonnnngggg and the <<<<ssssccccssssllll____bbbbllllaaaassss____iiii8888....hhhh>>>> header
  100.      file should be included.
  101.  
  102. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  103.      SSSSGGGGEEEEMMMMVVVV and DDDDGGGGEEEEMMMMVVVV multiply a real vector by a real general matrix.
  104.  
  105.      CCCCGGGGEEEEMMMMVVVV and ZZZZGGGGEEEEMMMMVVVV multiply a complex vector by a complex general matrix.
  106.  
  107.      These routines perform one of the following matrix-vector operations:
  108.  
  109.           _y <-  _a_l_p_h_a _A_x + _b_e_t_a _y
  110.  
  111.           _y <-  _a_l_p_h_a _A_T_x + _b_e_t_a _y
  112.  
  113.           _y <-  _a_l_p_h_a _A_H_x + _b_e_t_a _y
  114.  
  115.      where
  116.  
  117.      *   _a_l_p_h_a and _b_e_t_a are scalars,
  118.  
  119.      *   _x and _y are vectors
  120.  
  121.      *   _A is an _m-by-_n general matrix
  122.  
  123.      *   _A_T is the transpose of _A
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))                                                            SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      *   _A_H is the conjugate transpose of _A
  141.  
  142.      See the NOTES section of this man page for information about the
  143.      interpretation of the data types described in the following arguments.
  144.  
  145.      These routines have the following arguments:
  146.  
  147.      _t_r_a_n_s     Character.  (input)
  148.                Specifies the operation to be performed:
  149.  
  150.                _t_r_a_n_s = 'N' or 'n':  _y <- _a_l_p_h_a _A_x + _b_e_t_a _y
  151.  
  152.                _t_r_a_n_s = 'T' or 't':  _y  <-  _a_l_p_h_a _A_T_x + _b_e_t_a _y
  153.  
  154.                _t_r_a_n_s = 'C' or 'c':  _y <- _a_l_p_h_a _A_T_x + _b_e_t_a _y (SSSSGGGGEEEEMMMMVVVV, DDDDGGGGEEEEMMMMVVVV), or
  155.  
  156.                _y  <-  _a_l_p_h_a _A_H_x + _b_e_t_a _y (CCCCGGGGEEEEMMMMVVVV, ZZZZGGGGEEEEMMMMVVVV)
  157.  
  158.                For C/C++, a pointer to this character is passed.
  159.  
  160.      _m         Integer.  (input)
  161.                Specifies the number of rows in matrix _A.  _m >= 0.
  162.  
  163.      _n         Integer.  (input)
  164.                Specifies the number of columns in matrix _A.  _n >= 0.
  165.  
  166.      _a_l_p_h_a     Scalar alpha.  (input)
  167.                SSSSGGGGEEEEMMMMVVVV: Single precision.
  168.                DDDDGGGGEEEEMMMMVVVV: Double precision.
  169.                CCCCGGGGEEEEMMMMVVVV: Single precision complex.
  170.                ZZZZGGGGEEEEMMMMVVVV: Double precision complex.
  171.  
  172.                For C/C++, a pointer to this scalar is passed when alpha is
  173.                complex; otherwise, alpha is passed by value.
  174.  
  175.      _a         array of dimension (_l_d_a,_n).  (input)
  176.                SSSSGGGGEEEEMMMMVVVV: Single precision array.
  177.                DDDDGGGGEEEEMMMMVVVV: Double precision array.
  178.                CCCCGGGGEEEEMMMMVVVV: Single precision complex array.
  179.                ZZZZGGGGEEEEMMMMVVVV: Double precision complex array.
  180.                Before entry, the leading _m-by-_n part of array _a must contain
  181.                the matrix of coefficients.
  182.  
  183.      _l_d_a       Integer.  (input)
  184.                Specifies the first dimension of _a as declared in the calling
  185.                program.  _l_d_a >= MMMMAAAAXXXX(1,_m).
  186.  
  187.      _x         Array of dimension 1+(_k_x-1) * |_i_n_c_x|.  (input)
  188.                SSSSGGGGEEEEMMMMVVVV: Single precision array.
  189.                DDDDGGGGEEEEMMMMVVVV: Double precision array.
  190.                CCCCGGGGEEEEMMMMVVVV: Single precision complex array.
  191.                ZZZZGGGGEEEEMMMMVVVV: Double precision complex array.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))                                                            SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))
  203.  
  204.  
  205.  
  206.                Contains the vector _x.  When _t_r_a_n_s = 'N' or 'n', _k_x is _n;
  207.                otherwise, it is _m.
  208.  
  209.      _i_n_c_x      Integer.  (input)
  210.                Specifies the increment for the elements of _x.  _i_n_c_x must not
  211.                be 0.
  212.  
  213.      _b_e_t_a      Scalar beta.  (input)
  214.                SSSSGGGGEEEEMMMMVVVV: Single precision.
  215.                DDDDGGGGEEEEMMMMVVVV: Double precision.
  216.                CCCCGGGGEEEEMMMMVVVV: Single precision complex.
  217.                ZZZZGGGGEEEEMMMMVVVV: Double precision complex.
  218.                When _b_e_t_a is supplied as 0, _y need not be set on input.
  219.  
  220.                For C/C++, a pointer to this scalar is passed when beta is
  221.                complex; otherwise, beta is passed by value.
  222.  
  223.      _y         Array of dimension 1+(_k_y-1) * |_i_n_c_y|.  (input and output)
  224.                SSSSGGGGEEEEMMMMVVVV: Single precision array.
  225.                DDDDGGGGEEEEMMMMVVVV: Double precision array.
  226.                CCCCGGGGEEEEMMMMVVVV: Single precision complex array.
  227.                ZZZZGGGGEEEEMMMMVVVV: Double precision complex array.
  228.                Contains the vector _y.  When _t_r_a_n_s = 'N' or 'n', _k_y is _m;
  229.                otherwise, it is _n.  When _b_e_t_a is supplied as 0, _y need not be
  230.                set on input.  On exit, the updated vector overwrites array _y.
  231.  
  232.      _i_n_c_y      Integer.  (input)
  233.                Specifies the increment for the elements of _y.  _i_n_c_y must not
  234.                be 0.
  235.  
  236. NNNNOOOOTTTTEEEESSSS
  237.      SSSSGGGGEEEEMMMMVVVV, DDDDGGGGEEEEMMMMVVVV and CCCCGGGGEEEEMMMMVVVV, ZZZZGGGGEEEEMMMMVVVV are Level 2 Basic Linear Algebra
  238.      Subprograms (Level 2 BLAS).
  239.  
  240.      When working backward (_i_n_c_x < 0 or _i_n_c_y < 0), each routine starts at the
  241.      end of the vector and moves backward, as follows:
  242.  
  243.           _x(1-_i_n_c_x * (_n-1)), _x(1-_i_n_c_x * (_n-2)) , ..., _x(1)
  244.  
  245.           _y(1-_i_n_c_y * (_n-1)), _y(1-_i_n_c_y * (_n-2)) , ..., _y(1)
  246.  
  247.  
  248.    DDDDaaaattttaaaa TTTTyyyyppppeeeessss
  249.      The following data types are described in this documentation:
  250.  
  251.           TTTTeeeerrrrmmmm UUUUsssseeeedddd                     DDDDaaaattttaaaa ttttyyyyppppeeee
  252.  
  253.      Fortran:
  254.  
  255.           Array dimensioned _n           xxxx((((nnnn))))
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))                                                            SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))
  269.  
  270.  
  271.  
  272.           Array of dimensions (_m,_n)     xxxx((((mmmm,,,,nnnn))))
  273.  
  274.           Character                     CCCCHHHHAAAARRRRAAAACCCCTTTTEEEERRRR
  275.  
  276.           Integer                       IIIINNNNTTTTEEEEGGGGEEEERRRR (IIIINNNNTTTTEEEEGGGGEEEERRRR****8888 for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  277.  
  278.           Single precision              RRRREEEEAAAALLLL
  279.  
  280.           Double precision              DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN
  281.  
  282.           Single precision complex      CCCCOOOOMMMMPPPPLLLLEEEEXXXX
  283.  
  284.           Double precision complex      DDDDOOOOUUUUBBBBLLLLEEEE CCCCOOOOMMMMPPPPLLLLEEEEXXXX
  285.  
  286.      C/C++:
  287.  
  288.           Array dimensioned _n           xxxx[[[[_n]]]]
  289.  
  290.           Array of dimensions (_m,_n)     xxxx[[[[mmmm****nnnn]]]]
  291.  
  292.           Character                     cccchhhhaaaarrrr
  293.  
  294.           Integer                       iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  295.  
  296.           Single precision              ffffllllooooaaaatttt
  297.  
  298.           Double precision              ddddoooouuuubbbblllleeee
  299.  
  300.           Single precision complex      ssssccccssssllll____ccccoooommmmpppplllleeeexxxx
  301.  
  302.           Double precision complex      ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx
  303.  
  304.      C++ STL:
  305.  
  306.           Array dimensioned _n           xxxx[[[[_n]]]]
  307.  
  308.           Array of dimensions (_m,_n)     xxxx[[[[mmmm****nnnn]]]]
  309.  
  310.           Character                     cccchhhhaaaarrrr
  311.  
  312.           Integer                       iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  313.  
  314.           Single precision              ffffllllooooaaaatttt
  315.  
  316.           Double precision              ddddoooouuuubbbblllleeee
  317.  
  318.           Single precision complex      ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>>
  319.  
  320.           Double precision complex      ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>>
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))                                                            SSSSGGGGEEEEMMMMVVVV((((3333SSSS))))
  335.  
  336.  
  337.  
  338.      Note that you can explicitly declare multidimensional C/C++ arrays
  339.      provided that the array dimensions are swapped with respect to the
  340.      Fortran declaration (e.g., xxxx[[[[nnnn]]]][[[[mmmm]]]] in C/C++ versus xxxx((((mmmm,,,,nnnn)))) in Fortran).
  341.      To avoid a compiler type mismatch error in C++ (or a compiler warning
  342.      message in C), however, the array should be cast to a pointer of the
  343.      appropriate type when passed as an argument to a SCSL routine.
  344.  
  345. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  346.      IIIINNNNTTTTRRRROOOO____SSSSCCCCSSSSLLLL(3S), IIIINNNNTTTTRRRROOOO____BBBBLLLLAAAASSSS2222(3S)
  347.  
  348.      IIIINNNNTTTTRRRROOOO____CCCCBBBBLLLLAAAASSSS(3S) for information about using the C interface to Fortran 77
  349.      Basic Linear Algebra Subprograms (legacy BLAS) set forth by the Basic
  350.      Linear Algebra Subprograms Technical Forum.
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                                                         PPPPaaaaggggeeee 6666
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.